//
//  Content2TableViewCell.m
//  PlayerWorld
//
//  Created by 汪的一声就哭了！ on 16/8/17.
//  Copyright © 2016年 刘成. All rights reserved.
//

#import "Content2TableViewCell.h"

@implementation Content2TableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.mainLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.mainLabel];
        self.mainLabel.numberOfLines = 0;
        
        self.mainBtn = [UIButton buttonWithType:UIButtonTypeSystem];
        [self.contentView addSubview:self.mainBtn];
        [self.mainBtn setTitle:@"领取" forState:UIControlStateNormal];
        self.mainBtn.backgroundColor = [UIColor colorWithRed:36.0/255.0 green:11.0/255.0 blue:54.0/255.0 alpha:1];
        [self.mainBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        self.mainBtn.layer.cornerRadius = 5;
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.mainLabel.frame = CGRectMake(10, 10, self.contentView.bounds.size.width-20, 0);
    [self.mainLabel sizeToFit];
    
    self.mainBtn.frame = CGRectMake(self.contentView.bounds.size.width - 60, self.contentView.bounds.size.height - 35, 55, 25);
}
@end
